<template>
  <div class="upload-container">
    <vab-upload
      ref="vabUploadRef"
      :limit="50"
      name="file"
      :size="2"
      url="/upload"
    />
    <el-button
      style="
        background-color: #58b5e1;
        color: #fff;
        border: 0px;
        font-size: 14px;
      "
      @click="handleShow()"
    >
      模拟上传
    </el-button>
  </div>
</template>

<script>
  import VabUpload from '@/extra/VabUpload'
  import { defineComponent, ref } from 'vue'

  export default defineComponent({
    name: 'Upload',
    components: {
      VabUpload,
    },
    setup() {
      const vabUploadRef = ref()
      const handleShow = () => {
        vabUploadRef.value.handleShow()
      }

      return {
        vabUploadRef,
        handleShow,
      }
    },
  })
</script>
